package feign.ethan.springCloud.service;

import feign.ethan.springCloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author Ethan
 */
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT")
public interface DeptFeignClientService {

    @RequestMapping("/dept/detail/{id}")
    Dept detail(@PathVariable("id") Integer id);

    @RequestMapping("/dept/insert")
    Boolean save(Dept dept);

    @RequestMapping("/dept/all")
    List<Dept> all();

    @RequestMapping("/dept/detail/{id}")
    void delete(@PathVariable("id") Integer id);
}
